{#**
 * 2007-2020 PrestaShop SA and Contributors
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2020 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *#}
{% block product_footer %}
  <div class="product-footer justify-content-md-center">
    <div class="col-lg-4">
      <a
        href="{{ path('admin_product_unit_action', {action: 'delete', id: productId}) }}"
        class="tooltip-link btn btn-lg delete"
        data-toggle="pstooltip"
        id="product_form_delete_btn"
        title="{{ 'Permanently delete this product.'|trans({}, 'Admin.Catalog.Help') }}"
        data-placement="left"
        data-original-title="Delete"
      >
        <i class="material-icons">delete</i>
      </a>
      <a
        href=""
        data-seo-url="{{ seo_link }}"
        data-redirect="{{ preview_link }}"
        data-url-deactive="{{ preview_link_deactivate }}"
        target="_blank"
        class="btn btn-secondary preview"
        data-toggle="pstooltip"
        id="product_form_preview_btn"
        title="{{ 'See how your product sheet will look online: ALT+SHIFT+V'|trans({}, 'Admin.Catalog.Help') }}"
      >
        {{ 'Preview'|trans({}, 'Admin.Actions')}}
      </a>
      {% if editable %}
        <h2 class="for-switch online-title" {% if not is_active %}style="display:none;"{% endif %} data-toggle="pstooltip"
          title="{{ 'Enable or disable the product on your shop: ALT+SHIFT+O'|trans({}, 'Admin.Catalog.Help') }}">{{ 'Online'|trans({}, 'Admin.Global') }}</h2>
        <h2 class="for-switch offline-title" {% if is_active %}style="display:none;"{% endif %} data-toggle="pstooltip"
          title="{{ 'Enable or disable the product on your shop: ALT+SHIFT+O'|trans({}, 'Admin.Catalog.Help') }}">{{ 'Offline'|trans({}, 'Admin.Global') }}</h2>
        <input
          class="switch-input-lg"
          id="form_step1_active"
          data-toggle="switch"
          type="checkbox"
          name="form[step1][active]"
          value="1"
          {{ is_active ? 'checked="checked"' : '' }}
        />
      {% endif %}
    </div>
    <div class="col-sm-5 col-lg-7 text-right">
      <input
        id="submit"
        type="submit"
        class="btn btn-primary save uppercase ml-3"
        value="{{ 'Save'|trans({}, 'Admin.Actions') }}"
        data-toggle="pstooltip"
        title="{{ 'Save the product and stay on the current page: ALT+SHIFT+S'|trans({}, 'Admin.Catalog.Help') }}"
      />
      {% if is_shop_context %}
        <button
          type="button"
          class="btn btn-outline-secondary btn-submit hidden-xs uppercase duplicate ml-3"
          id="product_form_save_duplicate_btn"
          data-redirect="{{ path('admin_product_unit_action', {action: 'duplicate', id: productId}) }}"
          data-toggle="pstooltip"
          title="{{ 'Save and duplicate this product, then go to the new product: ALT+SHIFT+D'|trans({}, 'Admin.Catalog.Help') }}"
        >
          {{ 'Duplicate'|trans({}, 'Admin.Actions')|raw }}
        </button>
      {% endif %}
      <button
        type="button"
        class="btn btn-outline-secondary btn-submit hidden-xs uppercase go-catalog ml-3"
        id="product_form_save_go_to_catalog_btn"
        data-redirect="{{ path('admin_product_catalog', {'offset': 'last', 'limit': 'last'}) }}"
        data-toggle="pstooltip"
        title="{{ 'Save and go back to the catalog: ALT+SHIFT+Q'|trans({}, 'Admin.Catalog.Help') }}"
      >
        {{ 'Go to catalog'|trans({}, 'Admin.Catalog.Feature')|raw }}
      </button>
      <button
        type="button"
        class="btn btn-outline-secondary btn-submit hidden-xs uppercase new-product ml-3"
        id="product_form_save_new_btn"
        data-redirect="{{ path('admin_product_new') }}"
        data-toggle="pstooltip"
        title="{{ 'Save and create a new product: ALT+SHIFT+P'|trans({}, 'Admin.Catalog.Help') }}"
      >
        {{ 'Add new product'|trans({}, 'Admin.Catalog.Feature')|raw }}
      </button>

      <div class="js-spinner spinner hide btn-primary-reverse onclick mr-1 btn"></div>
      <div class="btn-group hide dropdown">
        <button
          class="btn btn-primary js-btn-save ml-3"
          type="submit"
        >
          <span>{{ 'Save'|trans({}, 'Admin.Actions') }}</span>
        </button><button
                   class="btn btn-primary dropdown-toggle dropdown-toggle-split"
                   type="button"
                   id="dropdownMenu"
                   data-toggle="dropdown"
                   aria-expanded="false"
                 >
          <span class="sr-only">Toggle Dropdown</span>
        </button>
        <div class="dropdown-menu" aria-labelledby="dropdownMenu">
          {% if is_shop_context %}
            <a
              class="dropdown-item duplicate js-btn-save"
              href="{{ path('admin_product_unit_action', {action: 'duplicate', id: productId}) }}"
            >
              {{ 'Duplicate'|trans({}, 'Admin.Actions')|raw }}
            </a>
          {% endif %}
          <a
            class="dropdown-item go-catalog js-btn-save"
            href="{{ path('admin_product_catalog', {'offset': 'last', 'limit': 'last'}) }}"
          >
            {{ 'Go to catalog'|trans({}, 'Admin.Catalog.Feature')|raw }}
          </a>
          <a
            class="dropdown-item new-product js-btn-save"
            href="{{ path('admin_product_new') }}"
          >
            {{ 'Add new product'|trans({}, 'Admin.Catalog.Feature')|raw }}
          </a>
        </div>
      </div>
    </div>
  </div>
{% endblock %}
